package com.zx.feign;

import com.zx.common.ResponseCommon;
import com.zx.common.TableId;
import com.zx.feign.fallBack.GoodsClientHystrix;
import com.zx.vo.SimpleGoodsInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * Author:JasonZ
 * Data:2023/4/21
 */
//value 指的nacos的服务名
@FeignClient(value = "goods-service", fallback = GoodsClientHystrix.class)
public interface SecuredGoodsClient {
    /**
     * 根据id查询简易商品信息
     *
     * @param tableId
     * @return
     */
    @PostMapping( "/goods-service/goods/get-simple-goods")
    ResponseCommon<List<SimpleGoodsInfo>> getSimpleGoodsInfos(@RequestBody TableId tableId);
}
